22 research outputs found

    VPS: Excavating high-level C++ constructs from low-level binaries to protect dynamic dispatching

    Get PDF
    Polymorphism and inheritance make C++ suitable for writing complex software, but significantly increase the attack surface because the implementation relies on virtual function tables (vtables). These vtables contain function pointers that attackers can potentially hijack and in practice, vtable hijacking is one of the most important attack vector for C++ binaries. In this paper, we present VTable Pointer Separation (vps), a practical binary-level defense against vtable hijacking in C++ applications. Unlike previous binary-level defenses, which rely on unsound static analyses to match classes to virtual callsites, vps achieves a more accurate protection by restricting virtual callsites to validly created objects. More specifically, vps ensures that virtual callsites can only use objects created at valid object construction sites, and only if those objects can reach the callsite. Moreover, vps explicitly prevents false positives (falsely identified virtual callsites) from breaking the binary, an issue existing work does not handle correctly or at all. We evaluate the prototype implementation of vps on a diverse set of complex, real-world applications (MongoDB, MySQL server, Node.js, SPEC CPU2017/CPU2006), showing that our approach protects on average 97.8% of all virtual callsites in SPEC CPU2006 and 97.4% in SPEC CPU2017 (all C++ benchmarks), with a moderate performance overhead of 11% and 9% geomean, respectively. Furthermore, our evaluation reveals 86 false negatives in VTV, a popular source-based defense which is part of GCC

    Devil is Virtual: Reversing Virtual Inheritance in C++ Binaries

    Full text link
    Complexities that arise from implementation of object-oriented concepts in C++ such as virtual dispatch and dynamic type casting have attracted the attention of attackers and defenders alike. Binary-level defenses are dependent on full and precise recovery of class inheritance tree of a given program. While current solutions focus on recovering single and multiple inheritances from the binary, they are oblivious to virtual inheritance. Conventional wisdom among binary-level defenses is that virtual inheritance is uncommon and/or support for single and multiple inheritances provides implicit support for virtual inheritance. In this paper, we show neither to be true. Specifically, (1) we present an efficient technique to detect virtual inheritance in C++ binaries and show through a study that virtual inheritance can be found in non-negligible number (more than 10\% on Linux and 12.5\% on Windows) of real-world C++ programs including Mysql and libstdc++. (2) we show that failure to handle virtual inheritance introduces both false positives and false negatives in the hierarchy tree. These false positves and negatives either introduce attack surface when the hierarchy recovered is used to enforce CFI policies, or make the hierarchy difficult to understand when it is needed for program understanding (e.g., during decompilation). (3) We present a solution to recover virtual inheritance from COTS binaries. We recover a maximum of 95\% and 95.5\% (GCC -O0) and a minimum of 77.5\% and 73.8\% (Clang -O2) of virtual and intermediate bases respectively in the virtual inheritance tree.Comment: Accepted at CCS20. This is a technical report versio

    On improving automated program analysis to secure software systems

    No full text
    Software ist allgegenwĂ€rtig in unserem digitalen Zeitalter. Daher ist es unentbehrlich nach Schwachstellen in ihr zu suchen. Durch wachsende SoftwarekomplexitĂ€t wird es schwieriger, Software manuell zu analysieren. In dieser Arbeit beschĂ€ftigen wir uns mit der automatisierten Analyse von Software. Zu diesem Zweck haben wir Programme und Algorithmen entwickelt, mit denen wir sicherheitsrelevante Informationen auffinden können. Diese Arbeit hat vier Themenbereiche: Im ersten Bereich entwickeln wir eine generische Methode um Pseudozufallszahlengeneratoren und kryptografische Hash-Funktionen in geschlossener Software zu finden. Als NĂ€chstes haben wir eine Methode zur automatisierten Rekonstruktion von C++-Klassenhierarchien in BinĂ€rprogrammen erstellt. Im dritten Themenbereich haben wir C++-Verteidigungsmaßnahmen auf BinĂ€rebene verbessert. Im letzten Teil dieser Arbeit stellen wir einen Ansatz vor, um Programmbibliotheken und Skriptinterpreter auf ein Zielprogramm zuzuschneiden
    corecore